package com.jimet.utils;

import java.util.ArrayList;
import java.util.List;

import com.ckeditor.CKEditorConfig;

public class ConfigurationHelper {

	public static CKEditorConfig createConfig() {
		CKEditorConfig config = new CKEditorConfig();
		
		List<List<String>> list = new ArrayList<List<String>>();
		List<String> subList = new ArrayList<String>();
		subList.add("Preview");
		subList.add("-");
		subList.add("Bold");
		subList.add("Italic");
		subList.add("Underline");
		subList.add("Strike");
		subList.add("Subscript");
		subList.add("Superscript");
		subList.add("-");
		subList.add("RemoveFormat");
		list.add(subList);
		
		subList = new ArrayList<String>();
		subList.add("NumberedList");
		subList.add("BulletedList");
		subList.add("-");
		subList.add("Outdent");
		subList.add("Indent");
		subList.add("-");
		subList.add("Blockquote");
		subList.add("CreateDiv");
		subList.add("-");
		subList.add("JustifyLeft");
		subList.add("JustifyCenter");
		subList.add("JustifyRight");
		subList.add("JustifyBlock");
		subList.add("-");
		subList.add("BidiLtr");
		subList.add("BidiRtl'");
		list.add(subList);
		
		subList = new ArrayList<String>();
		subList.add("Link");
		subList.add("Unlink");
		subList.add("Anchor");
		list.add(subList);
		
		subList = new ArrayList<String>();
		subList.add("Source");
		list.add(subList);
		
		subList = new ArrayList<String>();
		subList.add("Cut");
		subList.add("Copy");
		subList.add("Paste");
		subList.add("PasteText");
		subList.add("PasteFromWord");
		subList.add("-");
		subList.add("Undo");
		subList.add("Redo");
		list.add(subList);
		
		subList = new ArrayList<String>();
		subList.add("Image");
		subList.add("Table");
		subList.add("HorizontalRule");
		subList.add("SpecialChar");
		list.add(subList);		
		
		subList = new ArrayList<String>();
		subList.add("Styles");
		subList.add("Format");
		subList.add("Font");
		subList.add("FontSize");
		list.add(subList);	
		
		subList = new ArrayList<String>();
		subList.add("TextColor");
		subList.add("BGColor");
		list.add(subList);	
		
		config.addConfigValue("toolbar", list);
		config.addConfigValue("width","840px");
		config.addConfigValue("height","500px");
		return config;
	}
	
	
	public static CKEditorConfig createMinimumConfig() {
		CKEditorConfig config = new CKEditorConfig();
		
		List<List<String>> list = new ArrayList<List<String>>();
		List<String> subList = new ArrayList<String>();
		subList.add("Bold");
		subList.add("Italic");
		subList.add("Underline");
		subList.add("-");
		subList.add("RemoveFormat");
		list.add(subList);
		
		config.addConfigValue("toolbar", list);
		config.addConfigValue("width","840px");
		config.addConfigValue("height","150px");
		return config;
	}	
}
